#ifndef _LOG_H_
#define _LOG_H_

#include <log4cplus/logger.h>
#include <log4cplus/fileappender.h>
#include <log4cplus/layout.h>
#include <log4cplus/ndc.h>
#include <log4cplus/helpers/loglog.h>
#include <log4cplus/helpers/property.h>
#include <log4cplus/loggingmacros.h>
#include <log4cplus/initializer.h>
#include <QStandardPaths>
#include "globaldata.h"

using namespace std;
using namespace log4cplus;
using namespace log4cplus::helpers;

#define SSMS_TRACE(p) LOG4CPLUS_TRACE(Log::_logger, p)
#define SSMS_DEBUG(p) LOG4CPLUS_DEBUG(Log::_logger, p)
#define SSMS_INFO(p) LOG4CPLUS_INFO(Log::_logger, p)
#define SSMS_WARNING(p) LOG4CPLUS_WARN(Log::_logger, p)
#define SSMS_ERROR(p) LOG4CPLUS_ERROR(Log::_logger, p)

class Log {
public:
	bool open_log();
	static Log& instance();
	static Logger _logger;

private:
	Log();
	virtual ~Log();
};

#endif // _LOG_H_
